import request from "@/utils/request";

// 用电新增
export function addEntryElecInfo(params) {
  return request({
    url: "/electric-meter/gateway",
    method: "POST",
    data: params || {}
  });
}

// 用电更新
export function updateEntryElecInfo(params) {
  return request({
    url: "/electric-meter/gateway",
    method: "PUT",
    data: params || {}
  });
}

// 用电删除
export function deleteEntryElecInfo(id) {
  return request({
    url: `/electric-meter/gateway/${id}`,
    method: "DELETE"
  });
}

// 用电分页
export function findEntryElecPageList(params) {
  return request({
    url: "/electric-meter/gateway/list-page",
    method: "POST",
    data: params || {}
  });
}
// 制冷新增
export function addEntryColdInfo(params) {
  return request({
    url: "/electric-meter/gateway",
    method: "POST",
    data: params || {}
  });
}

// 制冷更新
export function updateEntryColdInfo(params) {
  return request({
    url: "/electric-meter/gateway",
    method: "PUT",
    data: params || {}
  });
}

// 制冷删除
export function deleteEntryColdInfo(id) {
  return request({
    url: `/electric-meter/gateway/${id}`,
    method: "DELETE"
  });
}

// 制冷分页
export function findEntryColdPageList(params) {
  return request({
    url: "/electric-meter/gateway/list-page",
    method: "POST",
    data: params || {}
  });
}
export function getDistributionInfo() {
  return request({
    url: "/electric-meter/gateway/list-page",
    method: "GET",
  });
}
